/*
	TimeDec.h
	Christopher Raffaele
	04.28.2008

	Time's class declarations
*/
#include<iostream>
#include<cstring>

using namespace std;

class TimeConverter{
private:
	void showMainMenu(); //displays the convert from menu

	double **conversionTable; //2d array holding the values to perform conversions
	std::string *units; //array holding the unit label

	void createConversionTable();

	void setSecondsRow(); //set the values in the table for conversions involving seconds
	void setMinutesRow(); //set the values in the table for conversions involving minutes
	void setHoursRow(); //set the values in the table for conversions involving hours
	void setYearsRow(); //set the values in the table for conversions involving years

	void createUnitsString(); //sets the labels in the units array

	unsigned int getConvertFromToChoice(bool from);
	double getTimeToConvert();

	void run(); //performs a time conversion

public:
	TimeConverter(); //creates the conversion table and unit string array
	~TimeConverter(); //deallocates dynamic memory used in the table and unit string array

	void start(); //continues running time conversion until the user wants to stop
	bool userWantsToRunAgain(); //checks if the user wants to continue time conversions
};